package mock.servicesdirectory.organisations.web.action;

import java.util.List;

import mock.servicesdirectory.common.entities.Department;
import mock.servicesdirectory.common.entities.Directorate;
import mock.servicesdirectory.organisations.business.businessinterface.DepartmentBO;

import com.opensymphony.xwork2.ActionSupport;

public class DepartmentAction extends ActionSupport{
	
	private DepartmentBO departmentBO;
	// department Name
	private String departmentName;
	//type Of Bussiness
	private String typeOfBussiness;
	// short Description
	private String shortDescription;
	//sic Code
	private String sicCode;
	//lead Contact
	private String leadContact;
	//departmentFullDesc
	private String departmentFullDesc;
	//copy From Organisation
	private String copyFromOrganisation;
	//copyParent
	private String copyParent;
	//address Line1
	private String addressLine1;
	//phoneNumber
	private int phoneNumber;
	//address Line2
	private String addressLine2;
	//fax
	private String fax;
	//address Line3
	private String addressLine3;
	//email
	private String email;
	//postCode
	private int postCode;
	//webAddress
	private String webAddress;
	//townVillage
	private String townVillage;
	//county
	private String county;
	//nation
	private String nation;
	

	private List<Department> gridModel;	
	private Integer rows = 0;	
	private Integer page = 0;	
	private String sord;	
	private String sidx;
	private String searchField;
	private String searchString;
	private String searchOper;	
	private Integer total = 0;
	private Integer records = 0;
	
	public DepartmentBO getDepartmentBO() {
		return departmentBO;
	}
	public void setDepartmentBO(DepartmentBO departmentBO) {
		this.departmentBO = departmentBO;
	}
	public String save(){
		return SUCCESS;
	}
	public String back(){
		return SUCCESS;
	}
	public String creat(){
		return SUCCESS;
	}
	public String detail(){
		return SUCCESS;
	}
	public String team(){
		return SUCCESS;
	}
	

	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public Integer getTotal() {
		return total;
	}

	public void setTotal(Integer total) {
		this.total = total;
	}

	public String getSearchOper() {
		return searchOper;
	}

	public void setSearchOper(String searchOper) {
		this.searchOper = searchOper;
	}

	public String getSearchString() {
		return searchString;
	}

	public void setSearchString(String searchString) {
		this.searchString = searchString;
	}

	public String getSearchField() {
		return searchField;
	}

	public void setSearchField(String searchField) {
		this.searchField = searchField;
	}

	public String getSidx() {
		return sidx;
	}

	public void setSidx(String sidx) {
		this.sidx = sidx;
	}

	public String getSord() {
		return sord;
	}

	public void setSord(String sord) {
		this.sord = sord;
	}

	public List<Department> getGridModel() {
		return gridModel;
	}

	public void setGridModel(List<Department> list) {
		this.gridModel = list;
	}

	public String execute() {		
		records = 30;
		rows = 10;
		
		setGridModel(departmentBO.getDepartment(1));
		setTotal((int) Math.ceil((double) records / (double) rows));

		return SUCCESS;
	}
	// Method to filter all Department
	public String filterAll(){
		// Call methods to get all database of Department via DepartmentBOImpl.getDepartment()
		return SUCCESS;
	}
	
	// Method to filter Department start with 0-9
	public String filter09(){
		// Call methos to get database of Department where name start with a digit 0-9 via DepartmentBOImpl.getDepartment(1)
		return SUCCESS;
	}
	
	// Method to filter Department start with ABCDE
	public String filterAE(){
		// Call methos to get database of Department where name start with a digit 0-9 via DepartmentBOImpl.getDepartment(2)
		
		return SUCCESS;
	}
	
	// Method to filter Department start with FGHIJ
	public String filterFJ(){
		// Call methos to get database of Department where name start with a digit 0-9 via DepartmentBOImpl.getDepartment(3)
		
		return SUCCESS;
	}
	
	// Method to filter Department start with KLMN
	public String filterKN(){
		// Call methos to get database of Department where name start with a digit 0-9 via DepartmentBOImpl.getDepartment(4)
		
		return SUCCESS;
	}
	
	// Method to filter Department start with OPQR
	public String filterOR(){
		// Call methos to get database of Department where name start with a digit 0-9 via DepartmentBOImpl.getDepartment(5)
		
		return SUCCESS;
		
	}
	
	// Method to filter Department start with STUV
	public String filterSV(){
		// Call methos to get database of Department where name start with a digit 0-9 via DepartmentBOImpl.getDepartment(6)
		
		return SUCCESS;
	}
	
	// Method to filter Department start with STUV
	public String filterWZ(){
		// Call methos to get database of Department where name start with a digit 0-9 via DepartmentBOImpl.getDepartment()
		
		return SUCCESS;
	}
}
